//模板专区接口
import { httpTokenRequest } from '../utils/http.js';

//获取热搜分类
export function getHotSearchList(params) {
	return httpTokenRequest({
		url: '/api/drygoods/showpic',
		method: 'POST',
		params: params
	});
}
// 获取导航分类
export function getKindList() {
	return httpTokenRequest({
		url: '/api/drygoods/getCate',
		method: 'POST',
	});
}
//获取模板列表
export function getModelList(params) {
	return httpTokenRequest({
		url: '/api/drygoods/getList',
		method: 'POST',
		params: params
	});
}

//获取模板详情
export function getModelInfo(params) {
	return httpTokenRequest({
		url: '/api/drygoods/getListinfo',
		method: 'POST',
		params: params
	});
}

//收藏/取消收藏
export function setCollect(params) {
	return httpTokenRequest({
		url: '/api/drygoods/setCollect',
		method: 'POST',
		params: params
	});
}

//下载模板支付接口
export function payModel(params) {
	return httpTokenRequest({
		url: '/api/drygoods/download',
		method: 'POST',
		params: params
	});
}

export default {

	//我的下载
	getDownloadList: function (params) {
		return httpTokenRequest({
			url: '/api/drygoods/mydownload',
			method: 'POST',
			params: params
		});
	},



	//获取模板专区历史搜索
	getDownloadHistorySearch: function (params) {
		return httpTokenRequest({
			url: '/api/drygoods/getHistorySearch',
			method: 'POST',
			params: params
		});
	},

	//清空模板专区历史搜索
	delDownloadHistorySearch: function (params) {
		return httpTokenRequest({
			url: '/api/drygoods/delHistorySearch',
			method: 'POST',
			params: params
		});
	},

	//获取模板专区热门搜索
	getDownloadHotSearch: function (params) {
		return httpTokenRequest({
			url: '/api/drygoods/getHotSearch',
			method: 'POST',
			params: params
		});
	},

	//删除我的下载
	delModel: function (params) {
		return httpTokenRequest({
			url: '/api/drygoods/del_mydownload',
			method: 'POST',
			params: params
		});
	},

	// 获取用户详情
	getUserInfo: function (params) {
		return httpTokenRequest({
			url: '/api/user/getUserInfo',
			method: 'POST',
			params: params
		});
	},


}
